color<-gsub("0","green",color)
plot(merge17705$RFSTIME,merge17705$EXPR,main="GSE17705",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge17705$EXPR~merge17705$RFSTIME), col="red")
color<-gsub("1","red",merge2990$RFSEVENT)
color<-gsub("0","green",color)
plot(merge2990$RFSTIME,merge2990$EXPR,main="2990",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge2990$EXPR~merge2990$RFSTIME), col="red")
color<-gsub("1","red",merge4922$RFSEVENT)
color<-gsub("0","green",color)
plot(merge4922$RFSTIME,merge4922$EXPR,main="4922",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge4922$EXPR~merge4922$RFSTIME), col="red")
color<-gsub("1","red",merge7390$RFSEVENT)
color<-gsub("0","green",color)
plot(merge7390$RFSTIME,merge7390$EXPR,main="7390",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge7390$EXPR~merge7390$RFSTIME), col="red")
dev.off()
probeset[,1]
#code for plot pdf scatter
data2<-probeset[3,2:ncol(probeset)]
data2<-rbind(colnames[2:length(colnames)],data2)
data2<-t(data2)
colnames(data2)<-c("GSMID","EXPR")
gse1456<-read.table("GSE1456_doc.txt",sep="\t",head=T,colClasses=c("character","character","factor","numeric","factor"))
merge1456<-merge(gse1456,data2,by='GSMID')
merge1456$EXPR<-as.numeric(levels(merge1456$EXPR)[merge1456$EXPR])
gse17705<-read.table("GSE17705_doc.txt",sep="\t",head=T,colClasses=c("character","character","factor","numeric","factor"))
merge17705<-merge(gse17705,data2,by='GSMID')
merge17705$EXPR<-as.numeric(levels(merge17705$EXPR)[merge17705$EXPR])
gse2990<-read.table("GSE2990_doc.txt",sep="\t",head=T,colClasses=c("character","character","factor","numeric","factor"))
merge2990<-merge(gse2990,data2,by='GSMID')
merge2990$EXPR<-as.numeric(levels(merge2990$EXPR)[merge2990$EXPR])
gse4922<-read.table("GSE4922_doc.txt",sep="\t",head=T,colClasses=c("character","character","factor","numeric","factor"))
merge4922<-merge(gse4922,data2,by='GSMID')
merge4922$EXPR<-as.numeric(levels(merge4922$EXPR)[merge4922$EXPR])
gse7390<-read.table("GSE7390_doc.txt",sep="\t",head=T,colClasses=c("character","character","factor","numeric","factor"))
merge7390<-merge(gse7390,data2,by='GSMID')
merge7390$EXPR<-as.numeric(levels(merge7390$EXPR)[merge7390$EXPR])
pdf("scatterplot_213417_at_event.pdf")
color<-gsub("1","red",merge1456$RFSEVENT)
color<-gsub("0","green",color)
plot(merge1456$RFSTIME,merge1456$EXPR,main="GSE1456",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge1456$EXPR~merge1456$RFSTIME), col="red")
color<-gsub("1","red",merge17705$RFSEVENT)
color<-gsub("0","green",color)
plot(merge17705$RFSTIME,merge17705$EXPR,main="GSE17705",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge17705$EXPR~merge17705$RFSTIME), col="red")
color<-gsub("1","red",merge2990$RFSEVENT)
color<-gsub("0","green",color)
plot(merge2990$RFSTIME,merge2990$EXPR,main="2990",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge2990$EXPR~merge2990$RFSTIME), col="red")
color<-gsub("1","red",merge4922$RFSEVENT)
color<-gsub("0","green",color)
plot(merge4922$RFSTIME,merge4922$EXPR,main="4922",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge4922$EXPR~merge4922$RFSTIME), col="red")
color<-gsub("1","red",merge7390$RFSEVENT)
color<-gsub("0","green",color)
plot(merge7390$RFSTIME,merge7390$EXPR,main="7390",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge7390$EXPR~merge7390$RFSTIME), col="red")
dev.off()
probeset[,1]
#code for plot pdf scatter
data2<-probeset[4,2:ncol(probeset)]
data2<-rbind(colnames[2:length(colnames)],data2)
data2<-t(data2)
colnames(data2)<-c("GSMID","EXPR")
gse1456<-read.table("GSE1456_doc.txt",sep="\t",head=T,colClasses=c("character","character","factor","numeric","factor"))
merge1456<-merge(gse1456,data2,by='GSMID')
merge1456$EXPR<-as.numeric(levels(merge1456$EXPR)[merge1456$EXPR])
gse17705<-read.table("GSE17705_doc.txt",sep="\t",head=T,colClasses=c("character","character","factor","numeric","factor"))
merge17705<-merge(gse17705,data2,by='GSMID')
merge17705$EXPR<-as.numeric(levels(merge17705$EXPR)[merge17705$EXPR])
gse2990<-read.table("GSE2990_doc.txt",sep="\t",head=T,colClasses=c("character","character","factor","numeric","factor"))
merge2990<-merge(gse2990,data2,by='GSMID')
merge2990$EXPR<-as.numeric(levels(merge2990$EXPR)[merge2990$EXPR])
gse4922<-read.table("GSE4922_doc.txt",sep="\t",head=T,colClasses=c("character","character","factor","numeric","factor"))
merge4922<-merge(gse4922,data2,by='GSMID')
merge4922$EXPR<-as.numeric(levels(merge4922$EXPR)[merge4922$EXPR])
gse7390<-read.table("GSE7390_doc.txt",sep="\t",head=T,colClasses=c("character","character","factor","numeric","factor"))
merge7390<-merge(gse7390,data2,by='GSMID')
merge7390$EXPR<-as.numeric(levels(merge7390$EXPR)[merge7390$EXPR])
pdf("scatterplot_205993_s_at_event.pdf")
color<-gsub("1","red",merge1456$RFSEVENT)
color<-gsub("0","green",color)
plot(merge1456$RFSTIME,merge1456$EXPR,main="GSE1456",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge1456$EXPR~merge1456$RFSTIME), col="red")
color<-gsub("1","red",merge17705$RFSEVENT)
color<-gsub("0","green",color)
plot(merge17705$RFSTIME,merge17705$EXPR,main="GSE17705",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge17705$EXPR~merge17705$RFSTIME), col="red")
color<-gsub("1","red",merge2990$RFSEVENT)
color<-gsub("0","green",color)
plot(merge2990$RFSTIME,merge2990$EXPR,main="2990",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge2990$EXPR~merge2990$RFSTIME), col="red")
color<-gsub("1","red",merge4922$RFSEVENT)
color<-gsub("0","green",color)
plot(merge4922$RFSTIME,merge4922$EXPR,main="4922",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge4922$EXPR~merge4922$RFSTIME), col="red")
color<-gsub("1","red",merge7390$RFSEVENT)
color<-gsub("0","green",color)
plot(merge7390$RFSTIME,merge7390$EXPR,main="7390",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge7390$EXPR~merge7390$RFSTIME), col="red")
dev.off()
probeset[,1]
merge1456<-merge(gse1456,data,by='GSMID')
merge17705<-merge(gse17705,data,by='GSMID')
merge2990<-merge(gse2990,data,by='GSMID')
merge4922<-merge(gse4922,data,by='GSMID')
merge7390<-merge(gse7390,data,by='GSMID')
merge1456$EXPR<-as.numeric(levels(merge1456$EXPR)[merge1456$EXPR])
merge17705$EXPR<-as.numeric(levels(merge17705$EXPR)[merge17705$EXPR])
merge2990$EXPR<-as.numeric(levels(merge2990$EXPR)[merge2990$EXPR])
merge4922$EXPR<-as.numeric(levels(merge4922$EXPR)[merge4922$EXPR])
merge7390$EXPR<-as.numeric(levels(merge7390$EXPR)[merge7390$EXPR])
pdf("scatterplot_event.pdf")
color<-gsub("1","red",merge1456$RFSEVENT)
color<-gsub("0","green",color)
plot(merge1456$RFSTIME,merge1456$EXPR,main="GSE1456",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge1456$EXPR~merge1456$RFSTIME), col="red")
color<-gsub("1","red",merge17705$RFSEVENT)
color<-gsub("0","green",color)
plot(merge17705$RFSTIME,merge17705$EXPR,main="GSE17705",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge17705$EXPR~merge17705$RFSTIME), col="red")
color<-gsub("1","red",merge2990$RFSEVENT)
color<-gsub("0","green",color)
plot(merge2990$RFSTIME,merge2990$EXPR,main="2990",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge2990$EXPR~merge2990$RFSTIME), col="red")
color<-gsub("1","red",merge4922$RFSEVENT)
color<-gsub("0","green",color)
plot(merge4922$RFSTIME,merge4922$EXPR,main="4922",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge4922$EXPR~merge4922$RFSTIME), col="red")
color<-gsub("1","red",merge7390$RFSEVENT)
color<-gsub("0","green",color)
plot(merge7390$RFSTIME,merge7390$EXPR,main="7390",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge7390$EXPR~merge7390$RFSTIME), col="red")
dev.off()
merge1456[1,]
merge1456[which(merge1456$EXPR>8.2),]
merge2990[which(merge2990$EXPR>8.2),]
merge2990[which(merge2990$EXPR>9),]
dim(data)
data[1,]
data<-read.table("temp",sep="\t",head=T)
colnames<-colnames(data)
data<-rbind(colnames,data)
dim(data)
data<-t(data)
dim(data)
data[1,]
colnames(data)<-c("GSMID","EXPR")
merge_filetered<-merge
merge_filetered<-merge_filetered[which(!is.na(merge_filetered$RFSEVENT)),]
 merge_filetered<-merge_filetered[which(!is.na(merge_filetered$RFSTIME)),]
merge_filetered$EXPR<-as.numeric(levels(merge_filetered$EXPR)[merge_filetered$EXPR]
)
merge_filetered[1,]
summary(merge_filetered)
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_filetered)
fit
merge1456<-merge(gse1456,data,by='GSMID')
 merge17705<-merge(gse17705,data,by='GSMID')
 merge2990<-merge(gse2990,data,by='GSMID')
 merge4922<-merge(gse4922,data,by='GSMID')
 merge7390<-merge(gse7390,data,by='GSMID')
 merge1456$EXPR<-as.numeric(levels(merge1456$EXPR)[merge1456$EXPR])
 merge17705$EXPR<-as.numeric(levels(merge17705$EXPR)[merge17705$EXPR])
 merge2990$EXPR<-as.numeric(levels(merge2990$EXPR)[merge2990$EXPR])
merge4922$EXPR<-as.numeric(levels(merge4922$EXPR)[merge4922$EXPR])
 merge7390$EXPR<-as.numeric(levels(merge7390$EXPR)[merge7390$EXPR])
summary(merge7390)
 pdf("scatterplot_event.pdf")
color<-gsub("1","red",merge1456$RFSEVENT)
color<-gsub("0","green",color)
plot(merge1456$RFSTIME,merge1456$EXPR,main="GSE1456",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge1456$EXPR~merge1456$RFSTIME), col="red")
color<-gsub("1","red",merge17705$RFSEVENT)
color<-gsub("0","green",color)
plot(merge17705$RFSTIME,merge17705$EXPR,main="GSE17705",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge17705$EXPR~merge17705$RFSTIME), col="red")
color<-gsub("1","red",merge2990$RFSEVENT)
color<-gsub("0","green",color)
plot(merge2990$RFSTIME,merge2990$EXPR,main="2990",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge2990$EXPR~merge2990$RFSTIME), col="red")
 color<-gsub("1","red",merge1456$RFSEVENT)
color<-gsub("0","green",color)
plot(merge7390$RFSTIME,merge7390$EXPR,main="7390",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 color<-gsub("0","green",color)
 plot(merge1456$RFSTIME,merge1456$EXPR,main="GSE1456",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge1456$EXPR~merge1456$RFSTIME), col="red")
 color<-gsub("1","red",merge17705$RFSEVENT)
color<-gsub("0","green",color)
plot(merge17705$RFSTIME,merge17705$EXPR,main="GSE17705",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
  abline(lm(merge17705$EXPR~merge17705$RFSTIME), col="red")
 color<-gsub("1","red",merge2990$RFSEVENT)
 color<-gsub("0","green",color)
 plot(merge2990$RFSTIME,merge2990$EXPR,main="2990",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
  abline(lm(merge2990$EXPR~merge2990$RFSTIME), col="red")
 color<-gsub("1","red",merge4922$RFSEVENT)
 color<-gsub("0","green",color)
 plot(merge4922$RFSTIME,merge4922$EXPR,main="4922",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
  abline(lm(merge4922$EXPR~merge4922$RFSTIME), col="red")
 color<-gsub("1","red",merge7390$RFSEVENT)
 color<-gsub("0","green",color)
 plot(merge7390$RFSTIME,merge7390$EXPR,main="7390",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
  abline(lm(merge7390$EXPR~merge7390$RFSTIME), col="red")
 dev.off()
merge1456<-merge(gse1456,data,by='GSMID')
 merge17705<-merge(gse17705,data,by='GSMID')
 merge2990<-merge(gse2990,data,by='GSMID')
 merge4922<-merge(gse4922,data,by='GSMID')
 merge7390<-merge(gse7390,data,by='GSMID')
 merge1456$EXPR<-as.numeric(levels(merge1456$EXPR)[merge1456$EXPR])
 merge17705$EXPR<-as.numeric(levels(merge17705$EXPR)[merge17705$EXPR])
 merge2990$EXPR<-as.numeric(levels(merge2990$EXPR)[merge2990$EXPR])
merge4922$EXPR<-as.numeric(levels(merge4922$EXPR)[merge4922$EXPR])
 merge7390$EXPR<-as.numeric(levels(merge7390$EXPR)[merge7390$EXPR])
 pdf("scatterplot_event.pdf")
color<-gsub("1","red",merge1456$RFSEVENT)
color<-gsub("0","green",color)
plot(merge1456$RFSTIME,merge1456$EXPR,main="GSE1456",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge1456$EXPR~merge1456$RFSTIME), col="red")
color<-gsub("1","red",merge17705$RFSEVENT)
color<-gsub("0","green",color)
plot(merge17705$RFSTIME,merge17705$EXPR,main="GSE17705",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge17705$EXPR~merge17705$RFSTIME), col="red")
color<-gsub("1","red",merge2990$RFSEVENT)
color<-gsub("0","green",color)
plot(merge2990$RFSTIME,merge2990$EXPR,main="2990",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge2990$EXPR~merge2990$RFSTIME), col="red")
color<-gsub("1","red",merge4922$RFSEVENT)
color<-gsub("0","green",color)
plot(merge4922$RFSTIME,merge4922$EXPR,main="4922",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge4922$EXPR~merge4922$RFSTIME), col="red")
color<-gsub("1","red",merge7390$RFSEVENT)
color<-gsub("0","green",color)
plot(merge7390$RFSTIME,merge7390$EXPR,main="7390",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge7390$EXPR~merge7390$RFSTIME), col="red"
 dev.off()
merge1456<-merge(gse1456,data,by='GSMID')
 merge17705<-merge(gse17705,data,by='GSMID')
 merge2990<-merge(gse2990,data,by='GSMID')
 merge4922<-merge(gse4922,data,by='GSMID')
 merge7390<-merge(gse7390,data,by='GSMID')
 merge1456$EXPR<-as.numeric(levels(merge1456$EXPR)[merge1456$EXPR])
 merge17705$EXPR<-as.numeric(levels(merge17705$EXPR)[merge17705$EXPR])
 merge2990$EXPR<-as.numeric(levels(merge2990$EXPR)[merge2990$EXPR])
merge4922$EXPR<-as.numeric(levels(merge4922$EXPR)[merge4922$EXPR])
 merge7390$EXPR<-as.numeric(levels(merge7390$EXPR)[merge7390$EXPR])
 pdf("scatterplot_event.pdf")
color<-gsub("1","red",merge1456$RFSEVENT)
color<-gsub("0","green",color)
plot(merge1456$RFSTIME,merge1456$EXPR,main="GSE1456",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge1456$EXPR~merge1456$RFSTIME), col="red")
color<-gsub("1","red",merge17705$RFSEVENT)
color<-gsub("0","green",color)
plot(merge17705$RFSTIME,merge17705$EXPR,main="GSE17705",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge17705$EXPR~merge17705$RFSTIME), col="red")
color<-gsub("1","red",merge2990$RFSEVENT)
color<-gsub("0","green",color)
plot(merge2990$RFSTIME,merge2990$EXPR,main="2990",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge2990$EXPR~merge2990$RFSTIME), col="red")
color<-gsub("1","red",merge4922$RFSEVENT)
color<-gsub("0","green",color)
plot(merge4922$RFSTIME,merge4922$EXPR,main="4922",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge4922$EXPR~merge4922$RFSTIME), col="red")
color<-gsub("1","red",merge7390$RFSEVENT)
color<-gsub("0","green",color)
plot(merge7390$RFSTIME,merge7390$EXPR,main="7390",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge7390$EXPR~merge7390$RFSTIME), col="red")
 dev.off()
 dev.off()
pdf("scatterplot_event.pdf")
color<-gsub("1","red",merge1456$RFSEVENT)
color<-gsub("0","green",color)
plot(merge1456$RFSTIME,merge1456$EXPR,main="GSE1456",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge1456$EXPR~merge1456$RFSTIME), col="red")
color<-gsub("1","red",merge17705$RFSEVENT)
color<-gsub("0","green",color)
plot(merge17705$RFSTIME,merge17705$EXPR,main="GSE17705",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge17705$EXPR~merge17705$RFSTIME), col="red")
color<-gsub("1","red",merge2990$RFSEVENT)
color<-gsub("0","green",color)
plot(merge2990$RFSTIME,merge2990$EXPR,main="2990",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge2990$EXPR~merge2990$RFSTIME), col="red")
color<-gsub("1","red",merge4922$RFSEVENT)
color<-gsub("0","green",color)
plot(merge4922$RFSTIME,merge4922$EXPR,main="4922",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge4922$EXPR~merge4922$RFSTIME), col="red")
color<-gsub("1","red",merge7390$RFSEVENT)
color<-gsub("0","green",color)
plot(merge7390$RFSTIME,merge7390$EXPR,main="7390",xlab=c("RFSTIME"),ylab=c("EXPR"),col=color)
 abline(lm(merge7390$EXPR~merge7390$RFSTIME), col="red")
 dev.off()
 pdf("scatterplot.pdf")
color<-gsub("1","red",merge1456$RFSEVENT)
color<-gsub("0","green",color)
plot(merge1456$RFSTIME,merge1456$EXPR,main="GSE1456",xlab=c("RFSTIME"),ylab=c("EXPR"))
 abline(lm(merge1456$EXPR~merge1456$RFSTIME), col="red")
color<-gsub("1","red",merge17705$RFSEVENT)
color<-gsub("0","green",color)
plot(merge17705$RFSTIME,merge17705$EXPR,main="GSE17705",xlab=c("RFSTIME"),ylab=c("EXPR"))
 abline(lm(merge17705$EXPR~merge17705$RFSTIME), col="red")
color<-gsub("1","red",merge2990$RFSEVENT)
color<-gsub("0","green",color)
plot(merge2990$RFSTIME,merge2990$EXPR,main="2990",xlab=c("RFSTIME"),ylab=c("EXPR"))
 abline(lm(merge2990$EXPR~merge2990$RFSTIME), col="red")
color<-gsub("1","red",merge4922$RFSEVENT)
color<-gsub("0","green",color)
plot(merge4922$RFSTIME,merge4922$EXPR,main="4922",xlab=c("RFSTIME"),ylab=c("EXPR"))
 abline(lm(merge4922$EXPR~merge4922$RFSTIME), col="red")
color<-gsub("1","red",merge7390$RFSEVENT)
color<-gsub("0","green",color)
plot(merge7390$RFSTIME,merge7390$EXPR,main="7390",xlab=c("RFSTIME"),ylab=c("EXPR"))
 abline(lm(merge7390$EXPR~merge7390$RFSTIME), col="red")
 dev.off()
gsa<-read.table("gsa_chen.txt",sep="\t")
dim(gsa)
gsa[1,]
samples_class1<-gsa[which(gsa[,2]==1),]
dim( samples_class1)
samples_class1[1,]
table(samples_class1[,2])
dim(merge_filetered)
merge_filetered[1,]
rownames(merge_filetered)<-merge_filetered[,1]
merge_filetered_class1<-merge_filetered[samples_class1[,1],]
dim(merge_filetered_class1)
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_filetered_class1)
fit
samples_class2<-gsa[which(gsa[,2]==2),]
samples_class3<-gsa[which(gsa[,2]==3),]
samples_class4<-gsa[which(gsa[,2]==4),]
samples_class5<-gsa[which(gsa[,2]==5),]
dim(samples_class2)
dim(samples_class2)
dim(samples_class3)
dim(samples_class4)
dim(samples_class5)
merge_filetered_class2<-merge_filetered[samples_class2[,1],]
merge_filetered_class3<-merge_filetered[samples_class3[,1],]
merge_filetered_class4<-merge_filetered[samples_class4[,1],]
merge_filetered_class5<-merge_filetered[samples_class5[,1],]
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_filetered_class2)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_filetered_class3)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_filetered_class4)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_filetered_class5)
fit
table(merge_filetered_class5$RFSTIME)
summary(merge_filetered_class5$RFSTIME)
summary(merge_filetered$RFSTIME)
merge_filetered_class1[1,]
dim(merge_filetered_class5)
merge_filetered_class5<-merge_filetered_class5[which(!is.na(merge_filetered_class5$RFSEVENT)),]
dim(merge_filetered_class5)
merge_filetered_class1<-merge_filetered_class1[which(!is.na(merge_filetered_class1$RFSEVENT)),]
merge_filetered_class2<-merge_filetered_class2[which(!is.na(merge_filetered_class2$RFSEVENT)),]
merge_filetered_class3<-merge_filetered_class3[which(!is.na(merge_filetered_class3$RFSEVENT)),]
merge_filetered_class4<-merge_filetered_class4[which(!is.na(merge_filetered_class4$RFSEVENT)),]
merge_filetered_class5<-merge_filetered_class5[which(!is.na(merge_filetered_class5$RFSEVENT)),]
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_filetered_class1)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_filetered_class5)
fit
probeset[,1]
data2<-probeset[1,2:ncol(probeset)]
data2<-rbind(colnames[2:length(colnames)],data2)
data2<-t(data2)
colnames(data2)<-c("GSMID","EXPR")
merge_pbs<-merge(data2,clin,by="GSMID")
merge_pbs<-merge_pbs[which(!is.na(merge_pbs$RFSEVENT)),]
merge_pbs<-merge_pbs[which(!is.na(merge_pbs$RFSTIME)),]
#merge_pbs$RFSEVENT<-as.numeric(levels(merge_pbs$RFSEVENT)[merge_pbs$RFSEVENT])
#merge_pbs$RFSTIME<-as.numeric(levels(merge_pbs$RFSTIME)[merge_pbs$RFSTIME])
merge_pbs$EXPR<-as.numeric(levels(merge_pbs$EXPR)[merge_pbs$EXPR])
#merge_pbs_er1<-merge_pbs[which(merge_pbs$ERSTATUS==1),]
#merge_pbs_er0<-merge_pbs[which(merge_pbs$ERSTATUS==0),]
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs)
#code for sub classess
#samples_class1<-gsa[which(gsa[,1]==2),]
#samples_class2<-gsa[which(gsa[,2]==2),]
#samples_class3<-gsa[which(gsa[,2]==3),]
#samples_class4<-gsa[which(gsa[,2]==4),]
#samples_class5<-gsa[which(gsa[,2]==5),]
merge_pbs_class1<-merge_pbs[samples_class1[,1],]
merge_pbs_class2<-merge_pbs[samples_class2[,1],]
merge_pbs_class3<-merge_pbs[samples_class3[,1],]
merge_pbs_class4<-merge_pbs[samples_class4[,1],]
merge_pbs_class5<-merge_pbs[samples_class5[,1],]
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class1)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class2)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class3)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class4)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class5)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs)
fit
data2<-probeset[2,2:ncol(probeset)]
data2<-rbind(colnames[2:length(colnames)],data2)
data2<-t(data2)
colnames(data2)<-c("GSMID","EXPR")
merge_pbs<-merge(data2,clin,by="GSMID")
merge_pbs<-merge_pbs[which(!is.na(merge_pbs$RFSEVENT)),]
merge_pbs<-merge_pbs[which(!is.na(merge_pbs$RFSTIME)),]
#merge_pbs$RFSEVENT<-as.numeric(levels(merge_pbs$RFSEVENT)[merge_pbs$RFSEVENT])
#merge_pbs$RFSTIME<-as.numeric(levels(merge_pbs$RFSTIME)[merge_pbs$RFSTIME])
merge_pbs$EXPR<-as.numeric(levels(merge_pbs$EXPR)[merge_pbs$EXPR])
#merge_pbs_er1<-merge_pbs[which(merge_pbs$ERSTATUS==1),]
#merge_pbs_er0<-merge_pbs[which(merge_pbs$ERSTATUS==0),]
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs)
#code for sub classess
#samples_class1<-gsa[which(gsa[,1]==2),]
#samples_class2<-gsa[which(gsa[,2]==2),]
#samples_class3<-gsa[which(gsa[,2]==3),]
#samples_class4<-gsa[which(gsa[,2]==4),]
#samples_class5<-gsa[which(gsa[,2]==5),]
merge_pbs_class1<-merge_pbs[samples_class1[,1],]
merge_pbs_class2<-merge_pbs[samples_class2[,1],]
merge_pbs_class3<-merge_pbs[samples_class3[,1],]
merge_pbs_class4<-merge_pbs[samples_class4[,1],]
merge_pbs_class5<-merge_pbs[samples_class5[,1],]
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class1)
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class1)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class2)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class3)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class4)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class45)
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class5)
fit
data2<-probeset[3,2:ncol(probeset)]
data2<-rbind(colnames[2:length(colnames)],data2)
data2<-t(data2)
colnames(data2)<-c("GSMID","EXPR")
merge_pbs<-merge(data2,clin,by="GSMID")
merge_pbs<-merge_pbs[which(!is.na(merge_pbs$RFSEVENT)),]
merge_pbs<-merge_pbs[which(!is.na(merge_pbs$RFSTIME)),]
#merge_pbs$RFSEVENT<-as.numeric(levels(merge_pbs$RFSEVENT)[merge_pbs$RFSEVENT])
#merge_pbs$RFSTIME<-as.numeric(levels(merge_pbs$RFSTIME)[merge_pbs$RFSTIME])
merge_pbs$EXPR<-as.numeric(levels(merge_pbs$EXPR)[merge_pbs$EXPR])
#merge_pbs_er1<-merge_pbs[which(merge_pbs$ERSTATUS==1),]
#merge_pbs_er0<-merge_pbs[which(merge_pbs$ERSTATUS==0),]
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs)
#code for sub classess
#samples_class1<-gsa[which(gsa[,1]==2),]
#samples_class2<-gsa[which(gsa[,2]==2),]
#samples_class3<-gsa[which(gsa[,2]==3),]
#samples_class4<-gsa[which(gsa[,2]==4),]
#samples_class5<-gsa[which(gsa[,2]==5),]
merge_pbs_class1<-merge_pbs[samples_class1[,1],]
merge_pbs_class2<-merge_pbs[samples_class2[,1],]
merge_pbs_class3<-merge_pbs[samples_class3[,1],]
merge_pbs_class4<-merge_pbs[samples_class4[,1],]
merge_pbs_class5<-merge_pbs[samples_class5[,1],]
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class1)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class2)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class3)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class4)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class5)
fit
data2<-probeset[4,2:ncol(probeset)]
data2<-rbind(colnames[2:length(colnames)],data2)
data2<-t(data2)
colnames(data2)<-c("GSMID","EXPR")
merge_pbs<-merge(data2,clin,by="GSMID")
merge_pbs<-merge_pbs[which(!is.na(merge_pbs$RFSEVENT)),]
merge_pbs<-merge_pbs[which(!is.na(merge_pbs$RFSTIME)),]
#merge_pbs$RFSEVENT<-as.numeric(levels(merge_pbs$RFSEVENT)[merge_pbs$RFSEVENT])
#merge_pbs$RFSTIME<-as.numeric(levels(merge_pbs$RFSTIME)[merge_pbs$RFSTIME])
merge_pbs$EXPR<-as.numeric(levels(merge_pbs$EXPR)[merge_pbs$EXPR])
#merge_pbs_er1<-merge_pbs[which(merge_pbs$ERSTATUS==1),]
#merge_pbs_er0<-merge_pbs[which(merge_pbs$ERSTATUS==0),]
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs)
#code for sub classess
#samples_class1<-gsa[which(gsa[,1]==2),]
#samples_class2<-gsa[which(gsa[,2]==2),]
#samples_class3<-gsa[which(gsa[,2]==3),]
#samples_class4<-gsa[which(gsa[,2]==4),]
#samples_class5<-gsa[which(gsa[,2]==5),]
merge_pbs_class1<-merge_pbs[samples_class1[,1],]
merge_pbs_class2<-merge_pbs[samples_class2[,1],]
merge_pbs_class3<-merge_pbs[samples_class3[,1],]
merge_pbs_class4<-merge_pbs[samples_class4[,1],]
merge_pbs_class5<-merge_pbs[samples_class5[,1],]
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class1)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class2)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class3)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class4)
fit
fit <- coxph(Surv(RFSTIME,RFSEVENT) ~ EXPR,data=merge_pbs_class5)
fit
probeset[,1]
savehistory("script3.R")
